import { defineStore } from "pinia";
export const useUserStore = defineStore("user", {
  state: () => ({
    user:{},
    token:''}),
  actions: {
    getUser(){
        this.user={
            username:'测试用户Re614',
            nickname:'Re614',
            email:'test@qq.com',
            userPic:'https://picsum.photos/200/200'
        }
        this.token='mock-token-123456'},
    removeToken(){
        this.token=''},
    setUser(user){
        this.user=user
    }}})
